<%@page import="com.javalong.mir.pojo.Media"%>
<%@ page language="java" contentType="text/html;charset=utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> 
<form id="pagerForm" action="media/listByPage" method="post">
	<input type="hidden" name="pageNum" value="${currentPage}" />
	<!--【必须】value=1可以写死-->
	<input type="hidden" name="numPerPage" value="${numPerPage}" />
	<!--【可选】每页显示多少条-->
</form>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="media/addjsp" target="dialog"><span>添加</span></a></li>
			<li><a class="delete"
				href="media/delete?id={sid_media}"
				target="ajaxTodo" title="确定要删除吗?"><span>删除</span></a></li>
			<li><a class="edit"
				href="media/updatejsp?id={sid_media}"
				target="dialog"><span>修改</span></a></li>
			<li><a class="add" href="media/addmorejsp"
				target="dialog"><span>批量添加图片</span></a></li>
			<li class="line">line</li>
		</ul>
	</div>
	<table class="table" layoutH="138">
		<thead>
			<tr>
				<th width="80px">id</th>
				<th width="100px">标题</th>
				<th width="100px">内容</th>
				<th width="100px">跳转链接</th>
				<th width="100px">图片地址</th>
				<th width="100px">宽度</th>
				<th width="100px">高度</th>
				<th width="100px">创建时间</th>
				<th width="100px">更新时间</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${mediaList}" var="k">
				<tr target="sid_media" rel="${k.id}">
					<td>${k.id}</td>
					<td>${k.title}</td>
					<td>${k.info}</td>
					<td>${k.forwardUrl}</td>
					<td>${k.avatarUrl}</td>
					<td>${k.imageWidth}</td>
					<td>${k.imageHeight}</td>
					<td><fmt:formatDate value="${k.createAt}" pattern="yyyy-MM-dd HH:mm:ss" /> </td>
					<td><fmt:formatDate value="${k.updateAt}" pattern="yyyy-MM-dd HH:mm:ss" /> </td>
					
				</tr>
			</c:forEach>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span> <select class="combox" name="numPerPage"
				onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="20">20</option>
				<option value="50">50</option>
				<option value="100">100</option>
				<option value="200">200</option>
			</select> <span>条，共${totalCount}条</span>
		</div>

		<div class="pagination" targetType="navTab" totalCount="${totalCount}"
			numPerPage="${numPerPage}" pageNumShown="10"
			currentPage="${currentPage}"></div>
	</div>
</div>

